package com.pengpeng.common.to.es;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 商品系统往es数据库发送的sku传输对象
 **/

@Data
public class SkuEsModel {

    /**
     * 在es中数据类型是keyword，存储到es时会自动转换
     */
    private Long skuId;

    private Long spuId;

    /**
     * sku标题
     */
    private String skuTitle;

    private BigDecimal skuPrice;

    private String skuImg;

    /**
     * 销量
     */
    private Long saleCount;

    /**
     * 是否有库存
     */
    private Boolean hasStock;

    /**
     * 热度评分
     */
    private Long hotScore;

    private Long brandId;

    private Long catalogId;

    private String brandName;

    private String brandImg;

    private String catalogName;

    /**
     * 商品的规格属性信息
     */
    private List<Attrs> attrs;

    @Data
    public static class Attrs {

        private Long attrId;

        private String attrName;

        private String attrValue;

    }


}
